@font-face {
font-family: "zpix";
src: url("../user_fonts/zpix.ttf") format("truetype");
}

.gameboy {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: #4f50db;
    font-family: zpix, sans-serif;
    -webkit-user-select: none;
    user-select: none;
    cursor: default;
    margin: 0 auto;
}

.gameboy .screen-area {
    position: relative;
    padding: 5px;
    background-color: #23252d;
    color: #67879a;
    display: flex;
}

.gameboy .screen-area .display {
    position: relative;
    height: min(100vh - 30px, 50vw - 5px);
    width: min(200vh - 60px, 100vw - 10px);
    left: calc(50% - min(100vh - 30px, 50vw - 5px));
    background-color: #929d97;
    border-radius: 3px;
    font-family: zpix;
}

.gameboy .controls {
    position: absolute;
    display: flex;
    padding: 20px;
    width: 100%;
    justify-content: space-between;
}

@media (orientation: portrait ){
    .gameboy .controls {
        top: 60%;
    }
    .gameboy .controls .dpad,
    .gameboy .controls .kpad {
        width: calc(40vw - 24px);
        height: calc(40vw - 24px);
    }
}
@media ( orientation: landscape ){

    .gameboy .controls {
        top: 50%;
    }

    .gameboy .controls .dpad,
    .gameboy .controls .kpad {
        width: 84pt;
        height: 84pt;
    }

    .gameboy .controls .dpad >*,
    .gameboy .controls .kpad >*,
    .gameboy .menu >*{
        opacity: 0.3;   
    }


    .gameboy .menu .select {
        position: absolute;
        left: calc(50% - 15vw - 80px);
        margin: 0 auto;
    }

    .gameboy .menu .start {
        position: absolute;
        left: calc(50% + 15vw);
        margin: 0 auto;
    }
}

.gameboy .menu {
    position: absolute;
    bottom: 15px;
    width: 100%;
    display: flex;
    justify-content: center;
}

.gameboy .logo {
    width: 100px;
    font-size: 7px;
    color: #3436bf;
    font-weight: bold;
    text-align: center;
    margin: 5px auto;
    border: 1px solid #3436bf;
    border-radius: 11px;
    text-shadow: 0px -2px 1px #6b67ed;
    box-shadow: 0px -2px 1px #6b67ed;
}

.gameboy .controls .dpad, 
.gameboy .controls .kpad {
    position: relative;
    display: inline-block;
}

.gameboy .controls .dpad>* {
    width: 33%;
    height: 33%;
    position: absolute;
    background-color: #565e6a;
    cursor: pointer;
}

.gameboy .controls .dpad .up {
    left: 33%;
    border-top: 4px solid black;
    border-left: 4px solid black;
    border-right: 4px solid black;
    border-radius: 5px 5px 0px 0px;
}

.gameboy .controls .dpad .up:active {
    background: linear-gradient(to top, #565e6a 0%, #333 100%);
}

.gameboy .controls .dpad .right {
    top: 33%;
    left: 66%;
    border-top: 4px solid black;
    border-bottom: 4px solid black;
    border-right: 4px solid black;
    border-radius: 0px 5px 5px 0px;
    box-shadow: 0px -2px 0px #888 inset;
}

.gameboy .controls .dpad .right:active {
    background: linear-gradient(to right, #565e6a 0%, #333 100%);
}

.gameboy .controls .dpad .down {
    top: 66%;
    left: 33%;
    border-left: 4px solid black;
    border-bottom: 4px solid black;
    border-right: 4px solid black;
    border-radius: 0px 0px 5px 5px;
    box-shadow: 0px -2px 0px #888 inset;
}

.gameboy .controls .dpad .down:active {
    background: linear-gradient(to bottom, #565e6a 0%, #333 100%);
}

.gameboy .controls .dpad .left {
    top: 33%;
    border-top: 4px solid black;
    border-bottom: 4px solid black;
    border-left: 4px solid black;
    border-radius: 5px 0px 0px 5px;
    box-shadow: 0px -2px 0px #888 inset;
}

.gameboy .controls .dpad .left:active {
    background: linear-gradient(to left, #565e6a 0%, #333 100%);
}

.gameboy .controls .dpad .middle {
    top: 33%;
    left: 33%;
}

.gameboy .controls .kpad .a,
.gameboy .controls .kpad .b,
.gameboy .controls .kpad .l,
.gameboy .controls .kpad .r {
    position: absolute;
    display: inline-block;
    font-size: 10px;
    width: 33%;
    height: 33%;
    line-height: 200%;
    border-radius: 50%;
    background-color: #2c313e;
    border-bottom: 2px solid #888;
    box-shadow: -1px 1px 5px black, 0px 0px 5px black inset;
    text-shadow: 0px -1px 1px #888;
    color: #fff;
    text-align: center;
    -webkit-user-select: none;
    user-select: none;
    cursor: pointer;
    transition: box-shadow 0.1s ease-out, border 0.1s ease-out, line-height 0.2s ease-out;
}

.gameboy .menu .select:active,
.gameboy .menu .start:active,
.gameboy .controls .kpad .l:active,
.gameboy .controls .kpad .r:active,
.gameboy .controls .kpad .a:active,
.gameboy .controls .kpad .b:active {
    box-shadow: -1px 1px 1px black, 0px 0px 5px black inset;
    border-width: 0px;
}

.gameboy .controls .kpad .a {
    bottom: 0%;
    right: 33%;
}

.gameboy .controls .kpad .b {
    top: 33%;
    right: 0%;
}

.gameboy .controls .kpad .l {
    top: 33%;
    left: 0%;
}

.gameboy .controls .kpad .r {
    left: 33%;
}

.gameboy .menu .select,
.gameboy .menu .start {
    font-size: 10px;
    width: 50px;
    line-height: 100%;
    text-shadow: 0px -1px 1px #888;
    color: #fff;
    text-align: center;
    margin: 0 auto;
    border-radius: 5px;
    background-color: #2c313e;
    box-shadow: -1px 1px 5px black, 0px 0px 5px black inset;
    text-shadow: 0px -1px 1px #888;
    -webkit-user-select: none;
    user-select: none;
    cursor: pointer;
}


* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
}
